/*
 * @Description:
 * @version:
 * @Author: sunqian_sr
 * @Date: 2023-02-01 15:09:55
 * @LastEditors: Andy
 * @LastEditTime: 2023-02-01 15:16:28
 */
import { Http } from '@/common/api'
// 列表
export const listUrl = '/upms/notice/page'

/**
 * 新增通知
 * @param params
 * @return {*|Promise}
 */
export const apiPostAddNotice = async (params) => Http.post('/upms/notice/add', params)
/**
 * 编辑通知
 * @param params
 * @return {*|Promise}
 */
export const apiPutEditNotice = async (params) => Http.put('/upms/notice/update', params)
/**
 * 根据ID查询
 * @param id
 * @return {*|Promise}
 */
export const apiGetNotice = async (id) => Http.get(`/upms/notice/findById/${id}`)
/**
 * 删除通知
 * @param ids
 * @return {*|Promise}
 */
export const apiDeleteNotice = async (ids) => Http.delete(`/upms/notice/batch/delete/${ids}`)

/**
 * 批量启用
 * @param params
 * @return {*|Promise}
 */
export const apiPutEnableNotice = async (params) => Http.put('/upms/notice/batch/enable', params)

/**
 * 批量停用
 * @param params
 * @return {*|Promise}
 */
export const apiPutDisableNotice = async (params) => Http.put('/upms/notice/batch/disable', params)
